/*
textbox_draw_dialog();
*/
var dialog_icon, dialog_icon_draw;
dialog_icon = " ";
if (((dialog_paused == true) xor (dialog_lineended == true)) and (dialog_textposition[1] > 0) and (string_length(dialog_text[1]) > 0))
{
    dialog_icon = string(chr(ord("!") + 147));
    if (ds_list_size(dialog_queue[0]) == 0)
    {
        dialog_icon = string(chr((ord("!") + 221)));
    }
}
if (alarm[0] < room_speed / 2)
{
dialog_icon_draw = dialog_icon;
}
else
{
dialog_icon_draw = " ";
}
if (string_length(dialog_text[1]) > 0)
{
    textbox_draw(view_xview[0]+8,view_yview[0]+8,304,16 + string_height_ext(dialog_text[1],10,296),string_copy(dialog_text[1],0,dialog_textposition[1]) + dialog_icon_draw);
}
else
{
    textbox_draw(view_xview[0]+8,view_yview[0]+8,304,16 + string_height_ext(dialog_lasttext,10,296),dialog_lasttext);
}
if (string_length(dialog_name)>0)
{
    draw_set_color(c_black);
    draw_rectangle(view_xview[0] + 16, view_yview[0] + 4, view_xview[0] + 16 + string_width(dialog_name) + 4, view_yview[0] + 15, false);
    textbox_draw_text(view_xview[0] + 20, view_yview[0] + 6, dialog_name, c_white, 0);
}
